package com.example.mypigcar.service;

import cn.hutool.db.sql.Order;
import com.example.mypigcar.common.exception.InsufficientBalance;
import com.example.mypigcar.common.exception.OrderExpiredException;
import com.example.mypigcar.common.exception.RepeatPaymentException;
import com.example.mypigcar.pojo.dto.AddOrderDTO;
import com.example.mypigcar.pojo.dto.EndOrderDTO;
import com.example.mypigcar.pojo.po.TOrder;
import com.example.mypigcar.pojo.vo.AdminOrderListVO;
import com.example.mypigcar.pojo.vo.DetailOrderVO;

import java.util.List;

/**
 * @author zkw
 * @Description 订单业务层
 * @createTime 2021年07月07日 08:34:00
 */
public interface TOrderService {

    boolean insert(TOrder addOrderDTO);

    boolean payOrder(Integer orderId, Integer userId) throws InsufficientBalance, RepeatPaymentException, OrderExpiredException;

    List<TOrder> getUserAllOrder(Integer userId);

    TOrder endOrder(EndOrderDTO endOrderDTO);

    List<AdminOrderListVO> selectAdminOrderList();

    DetailOrderVO getDetailOrder(Integer order_id);


}
